package com.zhenyi.youqu.miniapp;

import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import com.youqu.common.model.YqLocation;
import com.zhenyi.youqu.core.YQController;

public class LocationController extends YQController {

	@Override
	public void info() {
		String code = getPara("code");
		YqLocation location = new YqLocation();
		renderSuccess(location);
	}

	@Override
	public void list() {
		Kv kv = getSimpleKv("shopId");
		SqlPara sqlPara = db.getSqlPara("YQLocationList", kv);
		Page<Record> pages = db.paginate(getPage(), getPageSize(), sqlPara);
		renderPage(pages);
	}
}
